package sis.studentinfo;

import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;

/**
 * Created by IntelliJ IDEA.
 * User: alexander-kalden
 * Date: 9/11/12
 * Time: 9:31 AM
 * To change this template use File | Settings | File Templates.
 */
public class DateUtil {

    public static Date createDate(int year, int month, int dayOfMonth) {

        Calendar calendar = new GregorianCalendar();

        calendar.clear();

        calendar.set(Calendar.YEAR, year);
        // month goes from 0 - 11 ... therefore month - 1
        calendar.set(Calendar.MONTH, month - 1);
        calendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);

        return calendar.getTime();
    }
}
